Skip to content

Conversation

@unho
Copy link
Contributor

@unho unho commented Feb 12, 2023

Fixes #357

@unho unho force-pushed the sn-tin branch 6 times, most recently from b9a99a1 to bb62605 Compare February 12, 2023 16:01
@arthurdejong
Copy link
Owner

Hi @unho,

Thanks for providing this and sorry for taking so long to merge it. It is merged with a few clean-ups as dd22123.

I also implemented check digit validation in d332ee1 It was quite easy once I saw the pattern in a few of the test numbers you provided. For example, there were two numbers that only differed in one digit but still valid. The difference between the differing digits was 5 which shouldn't happen if you do modulo 11 so I assumed it was modulo 10 and the weight for that digit was 2. Playing around a bit resulted in the alternating 1 and 2 weights.

There were only 3 numbers from the original test set that did not match the check digit algorithm and I confirmed on https://e-ninea.ansd.sn/search_annuaire that these were indeed invalid numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Senegal TIN

2 participants